@echo off
cd .\WebProtect
call build
if ERRORLEVEL 1 goto BuildError
echo "========= Succeeded in building =========="
cd ..
del .\RegisterBHO\WebProtect.dll
echo "WebProtect.dll deleted"
del .\RegisterBHO\WebProtect.tlb
echo "WebProtect.tlb deleted"
copy .\release\WebProtect.dll .\RegisterBHO
echo "WebProtect.dll renewed"
copy .\WebProtect\Release\WebProtect.tlb .\RegisterBHO
echo "WebProtect.tlb renewed"
echo "========== Finished building and copying WebProtect =========="

goto Success

:BuildError
echo "========== Error in building the BHO files ========="

:Success
echo "========== Succeeded =========="